package com.d2rv.model;

import com.d2rv.offscreen.OffScreen3D;
import java.io.File;
import processing.core.PApplet;
import processing.core.PVector;

/**
  * Manager of the instruction model
 *
 * @author Darrieutort A., Dupouy A., Rossignol L., Van Poucke A.
 */
public class InstructionModelManager {

    private InstructionModel instructionarrowmodel;
    private InstructionModel instructionturnbackmodel;

    /**
     * Default constructor.
     * @param parent the current application
     */
    public InstructionModelManager(PApplet parent) {
        this.instructionarrowmodel = new InstructionModel(parent, parent.dataPath("models" + File.separator + "directional_arrow_front" + File.separator + "directional_arrow_front.obj"), new PVector(3, 3, 0));
        this.instructionturnbackmodel = new InstructionModel(parent, parent.dataPath("models" + File.separator + "directional_arrow_u_turn" + File.separator + "directional_arrow_u_turn.obj"), new PVector(3, 3, 0));
    }

    /**
     * Triggers the methods to draw the object
     * @param parent The current offscreen
     */
    public void drawInstructionArrow(OffScreen3D parent) {
        this.instructionarrowmodel.draw(parent);
    }

    /**
     * Triggers the methods to draw the turn back arrow model
     * @param parent the current offscreen
     */
    public void drawInstructionTurnBack(OffScreen3D parent) {
        this.instructionturnbackmodel.draw(parent);
    }

    /**
     * Returns the instructionarrowmodel 
     * @return the instructionarrowmodel 
     */
    public InstructionModel instructionarrowmodel() {
        return this.instructionarrowmodel;
    }

    /**
     * Returns the instructionturnbackmodel
     * @return the instructionturnbackmodel
     */
    public InstructionModel instructionturnbackmodel() {
        return this.instructionturnbackmodel;
    }
}